package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkEmployeePost;
import com.ysd.lis.entity.WkEmployeeProfessional;
import com.ysd.lis.service.WkEmployeeProfessionalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工档案-职称表 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-02-22
 */
@RestController
@RequestMapping("/wk/employeeProfessional")
public class WkEmployeeProfessionalController extends BaseController {

    @Autowired
    WkEmployeeProfessionalService wkEmployeeProfessionalService;
    @GetMapping("/getEmployeeProfessionalList/{wkEmployeeId}")
    public Result getEmployeeProfessionalList(@PathVariable("wkEmployeeId") String wkEmployeeId) {
        return wkEmployeeProfessionalService.getEmployeeProfessionalList(wkEmployeeId);
    }

    @PostMapping("/addEmployeeProfessional")
    public Result addEmployeeProfessional(@RequestBody WkEmployeeProfessional wkEmployeeProfessional) {
        return wkEmployeeProfessionalService.addEmployeeProfessional(wkEmployeeProfessional);
    }

    @PostMapping("/updateEmployeeProfessional")
    public Result updateEmployeeProfessional(@RequestBody WkEmployeeProfessional wkEmployeeProfessional) {
        return wkEmployeeProfessionalService.updateEmployeeProfessional(wkEmployeeProfessional);
    }

    @PostMapping("/deleteEmployeeProfessional")
    public Result deleteEmployeeProfessional(@RequestBody WkEmployeeProfessional wkEmployeeProfessional) {
        return wkEmployeeProfessionalService.deleteEmployeeProfessional(wkEmployeeProfessional);
    }
}
